package com.cell.api.application.netty.handler.base;

import com.cell.api.application.constants.Command;
import com.cell.api.application.netty.handler.DeviceStatusHandler;

/**
 * <p>
 * handler工厂
 * </p>
 *
 * @author zdy
 * @date 2021/11/10
 */
public class HandlerFactory {


    /**
     * 创建handler
     *
     * @param command 命令
     * @return handler
     */
    public static IBaseHandler createHandler(String command) {
        switch (command) {
            case Command.DEVICE_STATUS:
                return new DeviceStatusHandler();
            default:
                return null;
        }
    }
}
